import request from '@/utils/request'

// 查询房态管理列表
export function listRoom(query) {
  return request({
    url: '/lock/room/list',
    method: 'get',
    params: query
  })
}

// 查询房态管理详细
export function getRoom(id) {
  return request({
    url: '/lock/room/' + id,
    method: 'get'
  })
}

// 新增房态管理
export function addRoom(data) {
  return request({
    url: '/lock/room',
    method: 'post',
    data: data
  })
}

// 修改房态管理
export function updateRoom(data) {
  return request({
    url: '/lock/room',
    method: 'put',
    data: data
  })
}

// 删除房态管理
export function delRoom(id) {
  return request({
    url: '/lock/room/' + id,
    method: 'delete'
  })
}


// 解绑房间设备
export function jieBang(id) {
  return request({
    url: '/lock/room/jieBang/' + id,
    method: 'get'
  })
}


// 查询楼栋下的楼层
export function getLouCeng(query) {
  return request({
    url: '/lock/room/getLouCeng',
    method: 'get',
    params: query
  })
}

// 查询楼层下的房间
export function getFangJian(query) {
  return request({
    url: '/lock/room/getFangJian',
    method: 'get',
    params: query
  })
}
